home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-06-28 | 26.0 KB | 1,236 lines |
- -- background: 2581 from stack: in.0
- -- bmap block id: 2098
- -- flags: 4000
- -- background id: 0
- -- name: Chess
- ----- HyperTalk script -----
- on idle
- put empty into theString
- if SPortHasChar(1) is true then
- put recvUpTo(1,return,48,false,false) into theString
- end if
- if the length of theString > 1 then
- put theString after card field "inField"
- click at 112,141
- mimic theString
- end if
- end idle
-
- on mimic theString
- global cntlC3,connectStatus,cC1
- put word 1 of theString into request
- if request = "Move" then
- put word 2 of theString into piece
- delete first character of piece
- delete last character of piece
- put piece into field "Game Info"
- play harpsichord tempo 200 "cq e cq"
- put word 3 of theString into x
- put word 4 of theString into y
- set the loc of card button piece to x,y
- exit mimic
- end if
- if request = "Msg" then
- put "Msg Rcvd..." into field "Game Info"
- play harpsichord tempo 200 "eq c eq"
- exit mimic
- end if
- if request contains "***" then
- put word 2 of theString into piece
- if piece = "CONNECTED" then
- sendSPort 1,false,cC1 & return
- sendSPort 1,false,"ECHO OFF" & return
- sendSPort 1,false,cC1 & return
- sendSPort 1,false,"CONVERSE" & return
- put true into connectStatus
- put "Connected.." into field "Game Info"
- hide card button "Conn" of card "Main"
- show card button "Disc" of card "Main"
- exit mimic
- end if
- if piece contains "DISCONNECTED" then
- sendSPort 1,false,cntlC3 & "ECHO ON" & return
- put "Disconnected.." into field "Game Info"
- put false into connectStatus
- show card button "Conn" of card "Main"
- hide card button "Disc" of card "Main"
- exit mimic
- end if
- end if
- if request contains "cmd:" then
- exit mimic
- end if
- if request contains "ECHO" then
- exit mimic
- end if
- if connectStatus is true then
- put "Rcv Error..." into field "Game Info"
- play harpsichord tempo 200 "cq c cq"
- end if
- end mimic
-
-
- on centerPiece
- put item 1 of the loc of the target into x
- put item 2 of the loc of the target into y
- if x > 127 and x < 463
- then
- put (((x-127) div 42) * 42)+127+21 into x
- put (((y-1) div 42) * 42)+1+21 into y
- set the loc of the target to x,y
- else
- end if
- put word 3 of name of the target into MovePiece
- put "Move" && MovePiece && x && y into MoveText
- put MoveText into card field "outfield"
- play "click"
- repeat while the sound is not "done"
- end repeat
- sendMove MoveText
- end centerPiece
-
- on sendMove MoveText
- sendSPort 1,false,MoveText & return
- end sendMove
-
-
-
-
-
- -- part 2 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=127 top=1 right=44 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 3 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=169 top=1 right=44 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- beep
- end mouseUp
-
-
-
- -- part 4 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=211 top=1 right=44 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 5 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=253 top=1 right=44 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=295 top=1 right=44 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=337 top=1 right=44 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 8 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=379 top=1 right=44 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 9 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=421 top=1 right=44 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 10 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=127 top=43 right=86 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 11 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=169 top=43 right=86 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 12 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=211 top=43 right=86 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 13 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=253 top=43 right=86 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 14 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=295 top=43 right=86 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 15 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=337 top=43 right=86 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 16 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=379 top=43 right=86 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 17 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=421 top=43 right=86 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 18 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=127 top=85 right=128 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 19 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=169 top=85 right=128 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 20 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=211 top=85 right=128 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 21 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=253 top=85 right=128 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 22 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=295 top=85 right=128 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 23 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=337 top=85 right=128 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 24 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=379 top=85 right=128 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 25 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=421 top=85 right=128 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 26 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=127 top=127 right=170 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 27 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=169 top=127 right=170 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 28 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=211 top=127 right=170 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 29 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=253 top=127 right=170 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 30 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=295 top=127 right=171 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 31 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=337 top=127 right=170 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 32 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=379 top=127 right=170 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 33 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=421 top=127 right=170 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 34 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=127 top=169 right=212 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 35 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=169 top=169 right=212 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 36 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=211 top=169 right=212 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 37 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=253 top=169 right=212 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 38 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=295 top=169 right=212 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 39 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=337 top=169 right=212 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 40 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=379 top=169 right=212 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 41 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=421 top=169 right=212 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 42 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=127 top=211 right=254 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 43 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=169 top=211 right=254 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 44 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=211 top=211 right=254 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 45 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=253 top=211 right=254 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 46 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=295 top=211 right=254 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 47 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=337 top=211 right=254 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 48 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=379 top=211 right=254 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 49 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=421 top=211 right=254 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 51 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=127 top=253 right=296 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 52 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=169 top=253 right=296 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 53 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=211 top=253 right=296 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 54 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=253 top=253 right=296 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 55 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=295 top=253 right=296 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 56 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=337 top=253 right=296 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 57 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=379 top=253 right=296 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 58 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=421 top=253 right=296 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 59 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=127 top=295 right=338 bottom=170
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 60 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=169 top=295 right=338 bottom=212
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 61 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=211 top=295 right=338 bottom=254
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 62 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=253 top=295 right=338 bottom=296
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 63 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=295 top=295 right=338 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 64 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=337 top=295 right=338 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 65 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=379 top=295 right=338 bottom=422
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 66 (button)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=421 top=295 right=338 bottom=464
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
-
-
- -- part 67 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=1 top=1 right=19 bottom=124
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: Game Board
-
-
- -- part 68 (button)
- -- low flags: 80
- -- high flags: A003
- -- rect: left=29 top=306 right=318 bottom=96
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Save Board
- ----- HyperTalk script -----
- on mouseUp
- domenu "copy card"
- domenu "paste card"
- end mouseUp
-
-
-
- -- part 69 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=27 top=305 right=318 bottom=99
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Reset Board
- ----- HyperTalk script -----
- on mouseUp
- answer "Reset the Board?" with "Cancel" or "Yes"
- if it is "yes"
- then
- answer "Want to Watch? (Slower)" with "No" or "Yes"
- if it is "No"
- then
- set lockscreen to true
- else
- end if
- set the cursor to 4
- put "Black" into field "end1"
- put "White" into field "end2"
- setLoc "black rook1",1
- setLoc "black knight1",2
- setLoc "black bishop1",3
- setLoc "black queen",4
- setLoc "black king",5
- setLoc "black bishop2",6
- setLoc "black knight2",7
- setLoc "black rook2",8
- repeat with x=1 to 8
- setLoc "black pawn" & x,8+x
- end repeat
- setLoc "white rook1",57
- setLoc "white knight1",58
- setLoc "white bishop1",59
- setLoc "white queen",60
- setLoc "white king",61
- setLoc "white bishop2",62
- setLoc "white knight2",63
- setLoc "white rook2",64
- repeat with x=1 to 8
- setLoc "white pawn" & x,48+x
- end repeat
- set the cursor to 1
- else
- end if
- end mouseUp
-
- on setLoc pieceLoc,buttonLoc
- set the loc of button pieceLoc to the loc of bkgnd button buttonLoc
- end setloc
-
-
-
- -- part 74 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=466 top=2 right=19 bottom=511
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: End1
-
-
- -- part 75 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=466 top=319 right=336 bottom=511
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 9
- -- style flags: 256
- -- line height: 12
- -- part name: End2
-
-
- -- part 76 (button)
- -- low flags: 80
- -- high flags: A003
- -- rect: left=30 top=288 right=301 bottom=96
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Swap Sides
- ----- HyperTalk script -----
- on mouseUp
- answer "Want to Watch? (Slower)" with "No" or "Yes"
- if it is "No"
- then
- set lockscreen to true
- else
- end if
- set the cursor to 4
- if field "end1" is "White"
- then
- put "Black" into field "End1"
- put "White" into field "End2"
- else
- put "White" into field "End1"
- put "Black" into field "End2"
- end if
- resetLoc "White Rook1"
- resetLoc "White Rook2"
- resetLoc "White Knight1"
- resetLoc "White Knight2"
- resetLoc "White Bishop1"
- resetLoc "White Bishop2"
- resetLoc "White Queen"
- resetLoc "White King"
- repeat with pawn = 1 to 8
- resetLoc "White Pawn" & pawn
- end repeat
- resetLoc "Black Rook1"
- resetLoc "Black Rook2"
- resetLoc "Black Knight1"
- resetLoc "Black Knight2"
- resetLoc "Black Bishop1"
- resetLoc "Black Bishop2"
- resetLoc "Black Queen"
- resetLoc "Black King"
- repeat with pawn = 1 to 8
- resetLoc "Black Pawn" & pawn
- end repeat
- set the cursor to 1
- set lockscreen to false
- end mouseUp
-
- on resetLoc pieceName
- put item 1 of the loc of button pieceName into x
- put item 2 of the loc of button pieceName into y
-
- if x > 127 and x < 463
- then
- if x+294 > 442
- then
- put (x+294)-(2*(x+294-442)) into x
- else
- put x+294 into x
- end if
-
- if y+294 > 316
- then
- put (y+294)-(2*(y+294-316)) into y
- else
- put y+294 into y
- end if
- else
- end if
-
- set the loc of button pieceName to x,y
- end resetLoc
-
-
-
- -- part 78 (field)
- -- low flags: 00
- -- high flags: 0004
- -- rect: left=3 top=28 right=47 bottom=125
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Game Info
-
-
- -- part 79 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=474 top=293 right=318 bottom=501
- -- title width / last selected line: 0
- -- icon id / first selected line: 11045 / 11045
- -- text alignment: 1
- -- font id: 3
- -- text size: 10
- -- style flags: 0
- -- line height: 13
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- go home
- end mouseUp
-
-